home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1433 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: chronicle.mti.sgi.com!news
  2. From: austern@isolde.mti.sgi.com (Matt Austern)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Difficulty hiring people with C++ experience.
  5. Date: 11 Jan 1996 00:21:42 GMT
  6. Organization: SGI
  7. Message-ID: <AUSTERN.96Jan10162142@isolde.mti.sgi.com>
  8. References: <gmandelDJAoyx.Kpr@netcom.com> <4ai727$of3@nrchh52.rich.nt.com>
  9.     <4api46$c95@no-names.nerdc.ufl.edu> <4bto2d$gnq@usenet1.interramp.com>
  10.     <gmandelDKL1AF.K22@netcom.com> <4clu0d$623@usenet4.interramp.com>
  11.     <4d12p3$26lq@news.doit.wisc.edu> <4d19vg$kam@carbon.cudenver.edu>
  12. Reply-To: austern@mti.sgi.com
  13. NNTP-Posting-Host: isolde.mti.sgi.com
  14. In-reply-to: tgibson@evans.cudenver.edu's message of 10 Jan 1996 21:10:08 GMT
  15.  
  16. In article <4d19vg$kam@carbon.cudenver.edu> tgibson@evans.cudenver.edu (Todd Arthur Gibson) writes:
  17.  
  18. > I believe the original poster was talking about statically typed 
  19. > languages vs. dynamically typed languages.  C++ is statically
  20. > typed--the type of variables is known at compile-time.  You will
  21. > get a compiler error if you try to assign a float to a char*.
  22.  
  23. This is imprecise.  C++ objects have both static type (the type of the
  24. variable or expression that refers to them) and dynamic type.  The
  25. dynamic type of an object need not be the same as its static type,
  26. since a pointer or reference to a base class may be used to refer to
  27. an object of a derived class.  An object's dynamic type is
  28. automatically used in virtual function calls; you can also manipulate
  29. it explicitly using dynamic_cast and typeid.  The same is true in
  30. Eiffel, and Java, and many other languages; the terminology and
  31. details vary, but the basic distinction remains the same.
  32.  
  33. What's different about Smalltalk isn't that it has dynamic types but
  34. rather that it has only dynamic types, as opposed to both static and
  35. dynamic types.
  36. -- 
  37. Matt Austern
  38. SGI: MTI Compilers Group
  39. austern@isolde.mti.sgi.com
  40.